<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="2" />
<meta name="acc" content="0" />
<title>用户资质</title>
<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script type="text/javascript">
	$(document).ready(function(){
		$("#adduserqua").click(
				function() {
					var url =  "userqualification!input.action?deptId=${param.deptId}&projectId=${param.projectId}&typeId=${param.typeId}&organizationId=${param.organizationId}&userdeptId=${param.userdeptId}&userId=${param.userId}";
					mm = showDialogWindow(url);
						if (mm != null) {
							if ($.browser.msie) {
								document.getElementById("userQua").click();																    		   
				    		}else{
								window.location.reload();										
				    		}
						}
				});
			$("#cloBtn").click(function(){
				window.close();
			});	
	});
	function update(url){
		 mm = showDialogWindow(url);
			if (mm != null) {
				if ($.browser.msie) {
					document.getElementById("userQua").click();																    		   
	    		}else{
					window.location.reload();										
	    		}
			}
		};
	function del(url){
		$.ajax({ url: url, context: document.body, dataType:'text', success: function(msg){
			if("1"==msg){
				if ($.browser.msie) {
					document.getElementById("userQua").click();																    		   
	    		}else{
					window.location.reload();										
	    		}
			}else{
				alert("系统出错!");
			}
		}});			
			};
</script>
</head>
<body>
<form action="user_department.action" method="post" class="yform"
	id="mainForm">
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul
	class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
	<li><a id="build"
		class="ui-state-default ui-corner-top "
		href="${ctx}/project/labs/user!input.action?id=${param.userId}&deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&userdeptId=${param.userdeptId}">人员信息</a></li>
	<li><a id="design" class="ui-state-default ui-corner-top  "
		href="${ctx}/project/labs/userdepartment!input.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&id=${param.userdeptId}">部门信息</a></li>
	<li><a id="userQua" class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"
		href="${ctx}/project/labs/userqualification.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&userdeptId=${userdeptId}&userId=${param.userId}">人员资质</a></li>
	<li><a class="ui-state-default ui-corner-top "
		href="#">项目经历</a></li>
</ul>
<div>
<table>
	<tr>
		<th>用户姓名</th>
		<th>技术职称</th>
		<th>证书编号</th>
		<th>发证机关</th>
		<th>附件</th>
		<th>发证日期</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${userQuaList}" var="userQua">
		<tr>
			<td>${userQua.user.name}</td>
			<td>${userQua.title}</td>
			<td>${userQua.code}</td>
			<td>${userQua.certificate}</td>
			<td><a title="下载"
					href="${ctx}/servlet/annex?id=${userQua.attachment.id}" target="_blank">${userQua.attachment.upfileFileName}</a></td>
			<td>${userQua.certificateDate}</td>
			<td>
				<a href="#" onclick="update('${ctx }/project/labs/userqualification!input.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&userdeptId=${userdeptId}&userId=${userId}&id=${userQua.id}')">修改</a>
				<a href="#" onclick="del('${ctx }/project/labs/userqualification!deleteQuali.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}&userdeptId=${userdeptId}&userId=${userId}&id=${userQua.id}')">删除</a>
			</td>
		</tr>
	</c:forEach>
</table>
<div class="type-button"><input id="adduserqua"
	 type="button" class="submit" value="新增" /> 
	<input id="cloBtn"  type="button"   value="关闭" class="reset" />
</div>
</div>
</div>
</form>
</body>
</html>